{extend name="public/base"}

{block name="title"}
设置
{/block}

{block name="style"}
{css href="/static/wechat/css/set.css" /}
{/block}

{block name="body"}
<div class="pageControl set">
    <div class="msui_nav msui_navTop">
        <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">设置</h1>
    </div>
    <div class="weui-top">
        <div class="weui-cells">
            <a class="weui-cell weui-cell_access" href="{:url('account', ['type' => $type])}">
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">账户</p>
                </div>
                <div class="weui-cell__ft cl-9999 fs08"></div>
            </a>
            <a class="weui-cell weui-cell_access" href="{:url('about', ['type' => $type])}">
                <div class="weui-cell__bd">
                    <p class="fs08 cl-3333">关于</p>
                </div>
                <div class="weui-cell__ft cl-9999 fs08"></div>
            </a>
        </div>
        <div class="msui_button">
            <div class="msui_button-bd">
                <a class="msui_button-content logout background{$type}">退出登录</a>
            </div>
        </div>
    </div>

</div>
{/block}

{block name="javascript"}
<script>
    $(function () {
        $(".logout").click(function () {
            if(!confirm('确定退出登录？')) {
                return false;
            }
            $.get('{:url("logout")}', function (msg) {
                if (msg.code == 200) {
                    alert('退出成功！！');
                    window.location.href = '{:url("member/index")}';
                } else {
                    var code = msg.code;
                    alert(error_code[code]);
                }
            });
        });
    });
</script>
{/block}